home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / hard / drivr / cnetdevice.lha / cnetdevice / src / include / pcmcia.i < prev    next >
Encoding:
Text File  |  1997-06-09  |  3.6 KB  |  143 lines

  1. ; pcmcia includes
  2.  
  3.  STRUCTURE    CardHandle,0
  4.     STRUCT    cah_CardNode,LN_SIZE
  5.     APTR    cah_CardRemoved
  6.     APTR    cah_CardInserted
  7.     APTR    cah_CardStatus
  8.     UBYTE    cah_CardFlags
  9.     UBYTE    cah_
  10.     LABEL    CardHandle_SIZEOF
  11.  
  12. cah_sizeof = cardhandle_sizeof
  13.  
  14.  STRUCTURE    DeviceTData,0
  15.     ULONG    dtd_DTsize            ;Size of card (bytes)
  16.     ULONG    dtd_DTspeed            ;Speed of card in nanoseconds
  17.     UBYTE    dtd_DTtype            ;Type of card
  18.     UBYTE    dtd_DTflags            ;other flags
  19.     UBYTE    dtd_
  20.     LABEL    DeviceTData_SIZEOF
  21.  
  22.  
  23. CISTPL_DEVICE    = $01   ; Device descriptor, common memory
  24. CISTPL_CONF_MAP  = $1A   ; Card Configuration map
  25. CISTPL_CONFIG    = $1B   ; Card Configuration entry
  26. CISTPL_MANUF_ID  = $20   ; Card manufacturer's ID
  27. CISTPL_FUNC_ID   = $21   ; Function of card
  28.  
  29. DTTYPE_ETHER  = 1
  30.  
  31.  
  32.  
  33.  STRUCTURE    CardMemoryMap,0
  34.     APTR    cmm_CommonMemory
  35.     APTR    cmm_AttributeMemory
  36.     APTR    cmm_IOMemory
  37.     LABEL    CardMemoryMap_SIZEOF
  38.  
  39. * CardHandle.cah_CardFlags for OwnCard() function
  40.  
  41.     ; The CARDB_RESETREMOVE flag means you want the machine to
  42.     ; perform a HARDWARE RESET if the card in the credit-card slot is
  43.     ; removed while you own the CardSemaphore.
  44.  
  45.     BITDEF    CARD,RESETREMOVE,0    ;Hardware reset on card remove
  46.  
  47.     ; The CARDB_IFAVAILABLE flag means you only want your CardHandle
  48.     ; structure enqueued IF the credit card can be owned immediately.
  49.  
  50.     BITDEF    CARD,IFAVAILABLE,1
  51.  
  52.     ; The CARDB_DELAYOWNERSHIP flag means you never want a successful
  53.     ; return from OwnCard() even if the credit-card is available.  Rather
  54.     ; you will be notified of ownership via your cah_CardInserted
  55.     ; interrupt vector.
  56.  
  57.     BITDEF    CARD,DELAYOWNERSHIP,2
  58.  
  59.     ; The CARDB_POSTSTATUS flag is new for card.resource V39 (check
  60.     ; VERSION in resource base before using).  It tells the resource
  61.     ; that you want your Status Change Interrupt (if provided) to
  62.     ; be called twice in a row.  See OwnCard() for details.
  63.     ;
  64.  
  65.     BITDEF    CARD,POSTSTATUS,3
  66.  
  67. * ReleaseCard() function flags
  68.  
  69.     ; The CARDB_REMOVEHANDLE flag means you want to remove your
  70.     ; CardHandle structure from the list of CardHandle structures
  71.     ; whether or not you own the credit-card in the slot.
  72.  
  73.     BITDEF    CARD,REMOVEHANDLE,0
  74.  
  75. * ReadStatus() return flags
  76.  
  77.     BITDEF    CARD_STATUS,CCDET,6    ; Credit CARD_STATUS detect (1 == detected)
  78.     BITDEF    CARD_STATUS,BVD1,5    ; Battery Voltage Detect 1
  79.     BITDEF    CARD_STATUS,SC,5    ; Credit-CARD_STATUS (internal) status change
  80.     BITDEF    CARD_STATUS,BVD2,4    ; Battery Voltage Detect 2
  81.     BITDEF    CARD_STATUS,DA,4    ; Digital audio
  82.     BITDEF    CARD_STATUS,WR,3    ; Write enable (1 == enabled)
  83.     BITDEF    CARD_STATUS,BSY,2    ; Credit CARD_STATUS Busy
  84.     BITDEF    CARD_STATUS,IRQ,2    ; Interrupt request
  85.  
  86. * CardProgramVoltage() defines
  87.  
  88. CARD_VOLTAGE_0V        EQU    0    ; Set to default; maybe the same as 5V
  89. CARD_VOLTAGE_5V        EQU    1
  90. CARD_VOLTAGE_12V    EQU    2
  91.  
  92. * CardMiscControl() defines
  93.  
  94.     BITDEF    CARD,ENABLE_DIGAUDIO,1
  95.     BITDEF    CARD,DISABLE_WP,3
  96.  
  97. * CardInterface() defines
  98.  
  99. CARD_INTERFACE_AMIGA_0    EQU    0
  100.  
  101. *
  102. * Resource Vector Offsets
  103. *
  104.  
  105. RES_RESERVED    EQU    0
  106. RES_USERDEF    EQU    LIB_BASE-(RES_RESERVED*LIB_VECTSIZE)
  107. RES_NONSTD    EQU    RES_USERDEF
  108.  
  109. RESINIT        MACRO    ; [baseOffset ]
  110.         IFC    '\1',''
  111. COUNT_RES    SET    RES_USERDEF
  112.         ENDC
  113.         IFNC    '\1',''
  114. COUNT_RES    SET    \1
  115.         ENDC
  116.         ENDM
  117.  
  118.  
  119. RESDEF        MACRO    ; library Function Symbol
  120. \1        EQU    COUNT_RES
  121. COUNT_RES    SET    COUNT_RES-LIB_VECTSIZE
  122.         ENDM
  123.  
  124.     RESINIT
  125.     RESDEF    _LVOOwnCard
  126.     RESDEF    _LVOReleaseCard
  127.     RESDEF    _LVOGetCardMap
  128.     RESDEF    _LVOBeginCardAccess
  129.     RESDEF    _LVOEndCardAccess
  130.     RESDEF    _LVOReadCardStatus
  131.     RESDEF    _LVOCardResetRemove
  132.     RESDEF    _LVOCardMiscControl
  133.     RESDEF    _LVOCardAccessSpeed
  134.     RESDEF    _LVOCardProgramVoltage
  135.     RESDEF    _LVOCardResetCard
  136.     RESDEF    _LVOCopyTuple
  137.     RESDEF    _LVODeviceTuple
  138.     RESDEF    _LVOIfAmigaXIP
  139.     RESDEF    _LVOCardForceChange
  140.     RESDEF    _LVOCardChangeCount
  141.     RESDEF    _LVOCardInterface
  142.  
  143.